package algorithms;

import java.util.regex.Pattern;

import ClassPack.Class;

public class ClassNameGrader implements ClassGrader{

	@Override
	public double Grade(Class a, Class b) {
		Pattern a_patern =  Pattern.compile(a.getM_class_name());
		Pattern b_patern =  Pattern.compile(b.getM_class_name());
	
		if (
		(a_patern.matcher(b.getM_class_name()).matches()) ||
		(b_patern.matcher(a.getM_class_name())).matches() )
			return 10;
		else 
			return 0;
	}
	
	

}
